package com.android.binderserverclient0.workmanager

import android.content.Context
import android.util.Log
import androidx.work.Worker
import androidx.work.WorkerParameters
import androidx.work.workDataOf

class ContinuationCheck4(context: Context, workerParameters: WorkerParameters) :
    Worker(context, workerParameters) {

    override fun doWork(): Result {
        val stringBuilder = StringBuffer()
        for ((key, value) in inputData.keyValueMap) {
            stringBuilder.append(key).append(" : ").append(value).append("\n")
        }
        Thread.sleep(3000)
        Log.d("ContinuationCheck", "ContinuationCheck4 $stringBuilder")
        Log.d("ContinuationCheck","ContinuationCheck4 Done ...... ")
        return Result.success(workDataOf("whereFrom" to "This is from ContinuationCheck4"))
    }
}